using System;
namespace Niunan.VideoSys.Model
{
    /// <summary>advertiesment表实体类
    /// 作者:牛腩(QQ:164423073)
    /// 创建时间:2017-12-15 21:39:01
    /// </summary> 
    public partial class Advertiesment
    {
        /// <summary>
        /// 广告类型中文说明
        /// </summary>
        public string remarkstr
        {
            get
            {
                string remarkstr = "";
                switch (_remark)
                {
                    case "front":
                        remarkstr = "前置广告";
                        break;
                    case "pause":
                        remarkstr = "暂停广告";
                        break;
                    case "end":
                        remarkstr = "结尾广告";
                        break;
                    default:
                        break;
                }
                return remarkstr;
            }
        }

        /// <summary>
        /// 广告内容的IMG标签显示，广告不是图片的时候返回空字符串
        /// </summary>
        public string showimg {
            get {
                string str = "";
                if (_path.Contains(".jpg")||_path.Contains(".gif"))
                {
                    str = $"<img style='max-height:70px;' src='{_path}' />";
                } 
                return str;
            }
        }
    }
}
